package org.jeecg.modules.demo.tobedone.service.impl;

import org.jeecg.modules.demo.tobedone.entity.ApprovalKpi;
import org.jeecg.modules.demo.tobedone.mapper.ApprovalKpiMapper;
import org.jeecg.modules.demo.tobedone.service.IApprovalKpiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;

/**
 * @Description: 审批年度关键指标
 * @Author: jeecg-boot
 * @Date:   2025-08-13
 * @Version: V1.0
 */
@Service
public class ApprovalKpiServiceImpl extends ServiceImpl<ApprovalKpiMapper, ApprovalKpi> implements IApprovalKpiService {

    @Autowired
    private ApprovalKpiMapper approvalKpiMapper;
    //查询全部的审批列表
    @Override
    public List<ApprovalKpi> SelectApprovalKpiListAll(String orgId) {
        return approvalKpiMapper.SelectApprovalKpiListAll(orgId);
    }
    //根据责任部门查询审批列表，主要进行判断，用于找父部门
    @Override
    public String SelectApprovalKpiListByRespondepartment() {
        return approvalKpiMapper.SelectApprovalKpiListByRespondepartment();
    }
    //    根据一定条件查询审批列表，不同的状态
    @Override
    public List<ApprovalKpi> SelectApprovalKpiList() {
        return approvalKpiMapper.SelectApprovalKpiList();
    }
    //    更新审批列表的状态
    @Override
    public int saveApprovalKpi(ApprovalKpi approvalKpi) {
        return approvalKpiMapper.saveApprovalKpi(approvalKpi);
    }
    //    根据待办的id来更新状态
    @Override
    public int updateTaskstatusByTid(String id) {
        return approvalKpiMapper.updateTaskstatusByTid(id);
    }
    //    审批年度关键指标列表的记录
    @Override
    public int ApprovalSumOfKpi() {
        return approvalKpiMapper.ApprovalSumOfKpi();
    }
}
